package javacafe.action.factory;

import javacafe.action.Action;
import javacafe.action.ActionFactory;
import javacafe.action.freeboard.AddFreeBbsAction;
import javacafe.action.freeboard.AddFreeBbsFormAction;
import javacafe.action.freeboard.DeleteFreeBbsAction;
import javacafe.action.freeboard.DetailfreebbsAction;
import javacafe.action.freeboard.FreeBoardAction;
import javacafe.action.freeboard.InsertReplyAction;
import javacafe.action.freeboard.ReplyListAction;
import javacafe.action.freeboard.UpdateFreeBbsAction;
import javacafe.action.freeboard.UpdateFreeBbsFormAction;
import javacafe.action.noticeboard.AddNoticeAction;
import javacafe.action.noticeboard.AddNoticeFormAction;
import javacafe.action.noticeboard.DeleteNoticeAction;
import javacafe.action.noticeboard.DetailNoticeAction;
import javacafe.action.noticeboard.NoticeAction;
import javacafe.action.noticeboard.UpdateNoticeAction;
import javacafe.action.noticeboard.UpdateNoticeFormAction;


public class BbsPostActionFactory implements ActionFactory{
		private static BbsPostActionFactory factory;
			
			public static BbsPostActionFactory getInstance(){
				if(factory==null){
					factory=new BbsPostActionFactory();
				}
				return factory;
			}

			public Action getAction(String command){
				Action action=null;
				if(command.equalsIgnoreCase("freeboard")){
					action=new FreeBoardAction();
				
				}else if(command.equalsIgnoreCase("detailfreebbs")){
					action=new DetailfreebbsAction();
					
				}else if(command.equalsIgnoreCase("updatefreebbsform")){
					action=new UpdateFreeBbsFormAction();					
					
				}else if(command.equalsIgnoreCase("updatefreebbs")){
					action=new UpdateFreeBbsAction();					
				
				}else if(command.equalsIgnoreCase("addfreebbsform")){
					action=new AddFreeBbsFormAction();					
					
				}else if(command.equalsIgnoreCase("addfreebbs")){
					action=new AddFreeBbsAction();					
				
				}else if(command.equalsIgnoreCase("deletefreebbs")){
					action=new DeleteFreeBbsAction();					
								
				}else if(command.equalsIgnoreCase("noticeboard")){
					action=new NoticeAction();
						
				}else if(command.equalsIgnoreCase("detailnotice")){
					action=new DetailNoticeAction();					
				
				}else if(command.equalsIgnoreCase("updatenoticeform")){
					action=new UpdateNoticeFormAction();					
					
				}else if(command.equalsIgnoreCase("updatenotice")){
					action=new UpdateNoticeAction();					
				
				}else if(command.equalsIgnoreCase("addnoticeform")){
					action=new AddNoticeFormAction();					
					
				}else if(command.equalsIgnoreCase("addnotice")){
					action=new AddNoticeAction();					
				
				}else if(command.equalsIgnoreCase("deletenotice")){
					action=new DeleteNoticeAction();					
				
				}else if(command.equalsIgnoreCase("replylist")){
					action=new ReplyListAction();					
				
				}else if (command.equalsIgnoreCase("insertreply")) {
					action = new InsertReplyAction();
				}
				
				
				return action;
			}
		}



